<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const times = 20000;
      let html = "";
      for (let i = 0; i < times; i++) {
        html = `<div>${i}${html}</div>`;
      }
      document.body.innerHTML += html;
      const div = document.querySelector("div");
      for (let i = 0; i < times; i++) {
        div.style.fontSize = (i % 12) + 12 + "px";
        div.style.color = i % 2 ? "red" : "green";
        div.style.margin = (i % 12) + 12 + "px";
      }
    </script>
  </body>
</html>
